---
title: Fireworks AI
---

>[Fireworks AI](https://fireworks.ai) is a generative AI inference platform to run and
> customize models with industry-leading speed and production-readiness.



## Installation and setup

- Install the Fireworks integration package.

  ```bash
  pip install langchain-fireworks
  ```

- Get a Fireworks API key by signing up at [fireworks.ai](https://fireworks.ai).
- Authenticate by setting the FIREWORKS_API_KEY environment variable.

### Authentication

There are two ways to authenticate using your Fireworks API key:

1.  Setting the `FIREWORKS_API_KEY` environment variable.

    ```python
    os.environ["FIREWORKS_API_KEY"] = "<KEY>"
    ```

2.  Setting `api_key` field in the Fireworks LLM module.

    ```python
    llm = Fireworks(api_key="<KEY>")
    ```
## Chat models

See a [usage example](/oss/integrations/chat/fireworks).

```python
from langchain_fireworks import ChatFireworks
```
## LLMs

See a [usage example](/oss/integrations/llms/fireworks).

```python
from langchain_fireworks import Fireworks
```
## Embedding models

See a [usage example](/oss/integrations/text_embedding/fireworks).

```python
from langchain_fireworks import FireworksEmbeddings
```
